﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace ClusteringProblem.Model.DatasetInformation
{
    public abstract class DatasetInfo
    {
        public string Name { get; set; }
        public string ImagePath { get; set; }
        public byte[] Image { get; set; }
        public abstract string GroupsCount { get; }
        public abstract string ObjectsCount { get; }
        public abstract string AttributesCount { get; } 
        public abstract string Description { get; }

                
        

        public void SetDataImage(string name)
        {
            Name = name;
            ImagePath = @"Images\" + name + ".jpg";

            // strumień i reader pliku
            FileStream sourceFile = new FileStream(ImagePath, FileMode.Open); 
            BinaryReader binReader = new BinaryReader(sourceFile);
            byte[] output = new byte[sourceFile.Length]; 
            for (long i = 0; i < sourceFile.Length; i++)
                output[i] = binReader.ReadByte(); 
            sourceFile.Close(); 
            binReader.Close(); 

            Image = output;
            
            


        }
    }
}
